package org.batatasframework.support.searchable;

import java.util.ArrayList;
import java.util.List;

import org.batatasframework.support.type.OptionalIterable.OptionalEntry;

public class FieldQueryedOptional extends FieldQueryedDefault{

	private final List<FieldQueryedOptionItem> options = new ArrayList<>();
	
	public FieldQueryedOptional(String name, String title, int types, List<? extends OptionalEntry> optional) {
		super(name, title, types);
		
		for(OptionalEntry item : optional){
			options.add(new FieldQueryedOptionItem(item.getName(), item.getValue()));
		}
	}

	public List<FieldQueryedOptionItem> getOptions() {
		return options;
	}
}
